A magnetic sensor in the related art is disclosed, for example, in JP-A-2003-14458. FIG. 19 is a perspective view showing a magnetic sensor in the related art. FIG. 20 is a cross section taken along the line II-II′ of the magnetic sensor in the related art shown in FIG. 19.
The magnetic sensor is of a configuration including a Wheatstone bridge circuit 3 comprising four detecting elements 2A through 2D provided on the top surface of a substrate 1, a holder 4 holding the substrate 1 to cover the substrate 1 having the Wheatstone bridge circuit, and a first coil 5A and a second coil 5B comprising conductive wires wound around the holder 4 a specific number of turns and applying magnetic biases that are orthogonal to each other.
Because this magnetic sensor uses the first coil 5A and the second coil 5B wound around the holder 4 as means for applying magnetic biases, it is increased in size and a reduction in size cannot be readily achieved. Also, in order to generate magnetic fields, it is necessary to flow a current through each of the first coil 5A and the second coil 5B, and power consumption is consequently increased.
Also, for example, WO 03/056276 discloses a method of using magnetic bias films formed of a thin film of magnet as means for applying magnetic biases.
This magnetic sensor can solve the problem discussed above because it does not use coils but it uses magnetic bias films formed of substantially a square thin film of magnet when viewed in plan as means for applying magnetic biases.
In order to further reduce the magnetic sensor in size, the magnetic bias film has to be reduced in size as well. To this end, it is necessary to make the bottom area of the magnetic bias film smaller.
In this case, however, a magnetic field generated by the magnetic bias film becomes smaller, and there arises a problem that a desired magnetic field cannot be obtained. Further, when a large magnetic field is applied to such a magnetic bias film from the outside, the orientation of the magnetic bias is affected, and there arises a problem that an output of the magnetic sensor is affected.